﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Pages_ScheduleView : System.Web.UI.Page
{
	Int64 Route_id { get { return DS.ToInt64(Request.QueryString["Id"]); } }

	protected void Page_Load(object sender, EventArgs e)
	{
		if (!IsPostBack)
			BindControls();
	}

	private void BindControls()
	{
		Route r = DBEntity<Route>.Load(Route_id);
		if (r == null)
			return;
		lbRouteName.Text = r.Name;
		RouteStationM2M rsM2M = new RouteStationM2M();
		rsM2M.route.Id = Route_id;
		rpt1.DataSource = DBEntity<RouteStationM2M>.Select(rsM2M);
		rpt1.DataBind();
	}
}
